import { 
	defineComponent, defineAsyncComponent, 
	ref, watch, toRefs, h,
	onMounted,onActivated,onDeactivated,onUnmounted,onBeforeUnmount
	// getCurrentInstance
} from 'vue'

const Index = {
	component	: defineComponent,
	lazy		: defineAsyncComponent,
	onMounted,
	onActivated,
	onDeactivated,
	onUnmounted,
	onBeforeUnmount,
	ref,
	toRefs,
	watch,
	h,
	hh: (cpt, form, option) => {
		return h(cpt, {
			...option,
			'onUpdate:value': value => {
				console.log(form[name])
				return form[name] = value
			}
		})
	},
	render: (cpt, option) => ({ type:'render', customRender: (form, config) => $.hh(cpt, form, {...config, ...option}) })
}

export default Index